/*
 * @Author: xiaosihan 
 * @Date: 2021-04-26 22:38:19 
 * @Last Modified by: xiaosihan
 * @Last Modified time: 2021-11-06 23:51:55
 */

import _ from "lodash";
import * as THREE from "three";
import { LinePoints } from "xsh-react-three";


const pointArray: Array<LinePoints> = [
    [
        [0, 3, 0], [10, 3, 0],
        [10, 2, 0]
    ],
    [
        [0, 3, 0], [10, 3, 0],
        [10, 2, 0], [0, 2, 0],
        [0, 1, 0], [10, 1, 0],
        [10, 0, 0], [0, 0, 0],
    ],
    [
        [0, 3, 0], [5, 3, 0],
        [5, 2, 0], [0, 2, 0],
        [0, 1, 0], [5, 1, 0],
        [5, 0, 0], [0, 0, 0],
    ]
];

export const BuffGeotrys = [
    new THREE.BoxBufferGeometry(1, 1, 1, 1, 1, 1),
    // new THREE.ConeGeometry(0.2, 0.2, 64),
    // new THREE.CylinderGeometry(0.2, 0.2, 0.2, 64),
    // new THREE.IcosahedronGeometry(0.2, 8),
    // new THREE.TorusGeometry(0.2, 0.04, 64, 32),
    // new THREE.SphereGeometry(1, 64, 64),
    new THREE.TetrahedronGeometry(1),
    // new THREE.TorusKnotGeometry(0.2, 0.01)
];

const GeoPoint = BuffGeotrys.map(geo => {
    return _.chunk(geo.attributes.position.array, 3) as LinePoints;
});

pointArray.push(...GeoPoint);

export default pointArray;